package com.shitou.shitoumember.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shitou.shitoucommons.utils.PageUtils;
import com.shitou.shitoucommons.utils.RespBean;
import com.shitou.shitoumember.entity.CaptchaEntity;

import java.awt.image.BufferedImage;
import java.util.Map;

/**
 *
 *
 * @author shitouren
 * @email 3076767823@qq.com
 * @date 2023-03-28 16:52:06
 */
public interface CaptchaService extends IService<CaptchaEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 创建一个验证码
     * @param uuid
     * @return
     */
    BufferedImage createCaptcha(String uuid);


    /**
     * 验证
     * @param uuid
     * @param captcha
     * @return
     */
    boolean validate(String uuid, String captcha);


    /**
     * 发送邮箱
     * @param email
     * @param uuid
     * @return
     */
    RespBean sendEmail(String uuid, String email);

    RespBean sendCheckEmail(String uuid, String email);


    /**
     * 邮箱验证
     * @param uuid
     * @param captcha
     * @param email
     * @return
     */
    RespBean validateEmail(String uuid, String captcha, String email);


    /**
     * 发送注册的邮箱验证码s
     * @param uuid
     * @param email
     * @return
     */
    public RespBean sendRegisterEmail(String uuid, String email);
}

